< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03030110.xhp

(section: dateadd) (bookmark: bm_id6269417)
DateAdd function

DateAdd 関数

DateAdd Function [Runtime]
DateAdd 関数 [実行時](par_idN10548.)

Adds a date interval to a given date a number of times and returns the resulting date.
指定の日付に日付の間隔を何度か追加し、結果の日付を返します。(par_idN10558.)

(/section: dateadd)

Syntax:
構文:(par_idN1055B.)

DateAdd (Add, Count, Date)
DateAdd (Add, Count, Date)(par_idN1055F.)

Return value:
戻り値:(par_idN1061E.)

A Variant containing a date.
日付を含むバリエーション。(par_idN10622.)

Parameters:
パラメータ:(par_idN10625.)

Add - A string expression from the following table, specifying the date interval.
Add - 日付の間隔を指定する、後続のテーブルからの文字列式。(par_idN10629.)

(section: datetable)

Add (string value)
Add (文字列値)(par_idN10636.)

Explanation
説明(par_idN1063C.)

yyyy
Yyyy(par_idN10643.)

Year
(par_idN10649.)

q
q(par_idN10650.)

Quarter
四半期(par_idN10656.)

m
m(par_idN1065D.)

Month
(par_idN10663.)

y
y(par_idN1066A.)

Day of year
年内の通算日(par_idN10670.)

w
w(par_idN10677.)

Weekday
平日(par_idN1067D.)

ww
ww(par_idN10684.)

Week of year
(par_idN1068A.)

d
d(par_idN10691.)

Day
(par_idN10697.)

h
h(par_idN1069E.)

Hour
(par_idN106A4.)

n
n(par_idN106AB.)

Minute
(par_idN106B1.)

s
s(par_idN106B8.)

Second
(par_idN106BE.)


(/section: datetable)

Count - A numerical expression specifying how often the Add interval will be added (Count is positive) or subtracted (Count is negative).
Count - Add 間隔が追加される (Count は正) または 減算される (Count は負) 頻度を指定する数式。(par_idN106C1.)

Date - A given date or the name of a Variant variable containing a date. The Add value will be added Count times to this value.
Date - 指定の日付、または日付を含むバリエーション変数の名前。Add の値は Count 回この値に追加されます。(par_idN106C4.)

Example:
例:(par_idN106C7.)

Sub example_dateadd
Sub example_dateadd(par_idN106CB.)

msgbox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")
msgbox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")(par_idN106CE.)

End Sub
End Sub(par_idN106D1.)


< Prev / Next >